<%@ page language="java" contentType="text/html;charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@include file="/WEB-INF/header.jsp" %>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<meta name="keywords" content="美乐车,电动车报价,自行车报价,出租自行车,出租电动车,美乐车租车，车辆售后服务" />
<meta name="description" content="美乐车,美乐车租车，电动车报价,自行车报价，出租自行车，出租电动车，全国最大的车辆交易信息网站" />
<title>美乐车网-全国最大的车辆信息交易平台</title>

<link href="${ctx}/image/meileche.jpg" rel="shortcut icon"/>
<link rel="stylesheet" type="text/css" href="${ctx}/css/alogin.css">
<link rel="stylesheet" type="text/css" href="${ctx}/css/home.css">
<link rel="stylesheet" type="text/css" href="${ctx}/css/easyui.css">
<script type="text/javascript" src="${ctx}/js/common/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="${ctx}/js/common/jquery.cookie.js"></script>
<script type="text/javascript" src="${ctx}/layer/layer.js"></script>
<script type="text/javascript">
	function login(){
		var userName = $("#txtEmail").val();
		var password = $("#txtPass").val();
		if(userName == ""){
			$("#txtWarn").html("请输入用户名/手机号/邮箱").css("text-align", "left").css("color", "red").css("font-weight", "bold");
			return;
		}
		if(password == ""){
			$("#txtWarn").html("请输入密码").css("text-align", "left").css("color", "red").css("font-weight", "bold");
			return;
		}
    	$.ajax({
    		type: "post",
    		dataType: "text",
    		url:  "${ctx}/u.do?type=6&userName="+userName+"&password="+password,
    		success: function(v){
    			eval("var jsonObj = " + v);
    			if(jsonObj['data'] == "true"){
        			window.location.href="${ctx}/admin/index.jsp"; 
    			}else{
    				layer.alert("亲优，登陆失败了哦", 2);
    			}
    		}
    	});    	
	}
</script>
</head>
<body>
	<%@include file="nav.jsp" %>
	<div class="registerDiv">
		<div class="register" style="display:block;">
			<div class="existAccount">
				
			</div>
			<div>
				<div
					style="margin: 0px 20px 0px 20px; width: 410px; color: #636363; line-height: 40px;">
					<div style="float: left; width: 210px; font-weight: bold;">
						管理员登陆</div>
					<div
						style="float: left; width: 200px; text-align: right; font-size: 12px;">
						是用户？<a href="login.jsp">登陆</a>
					</div>
				</div>
				<div id="txtWarn"
					style="margin: 10px 20px 0px 20px; width: 410px; color: #636363; font-size: 12px; text-align: right; line-height: 20px; color: #fff;">
					美乐车</div>
					<div style="float:left;margin: 10px 20px 0px 10px; width: 430px; color: #636363; text-align: center; line-height: 40px;">
						<span class="control-group" id="email_input">
							<input id="txtEmail" type="text"
								class="input_email" placeholder="请输入邮箱/用户名/电话号码"/>
						</span>
					</div> 
				<div
					style="float:left;margin: 10px 20px 0px 20px; width: 410px; color: #636363; font-size: 12px; line-height: 40px;">
					
					<input id="txtPass" type="password"
								class="input_email" placeholder="请输入登陆密码"/>
				</div>
				<div
					style="margin: 10px 20px 0px 20px; width: 410px; color: #636363; text-align: center;">
					<input type="button" value="立即登陆" class="btn_register"
						onclick="login();" />
				</div>
			</div>
		</div>
		
		<img src="${ctx}/image/123.jpg" />
</body>
</html>
